home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Apple II Technical Notes / Technical.Notes / GSOS / TN.GSOS.007 < prev    next >
Encoding:
Text File  |  1989-08-21  |  2.5 KB  |  52 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. GS/OS
  8. #7:    Behavior of SET_DISKSW
  9.  
  10. Written by:    Matt Deatherage                                      July 1989
  11.  
  12. This Technical Note discusses changes to the documented behavior of SET_DISKSW 
  13. in System Software 5.0.  This Note is primarily of interest to device driver 
  14. authors.
  15. _____________________________________________________________________________
  16.  
  17. GS/OS Reference, Volume 2, states that the system service call SET_DISKSW 
  18. ($01FC90) will remove a device's blocks from the cache and place its volumes 
  19. off line.
  20.  
  21. With System Software 5.0, this behavior is slightly changed.  SET_DISKSW also 
  22. posts insertion and ejection notices to the GS/OS Notify Procedure queue, so 
  23. that notification procedures may be called.  This requires SET_DISKSW to check 
  24. the current status of the device to know if the disk switched condition 
  25. indicates an insertion or an ejection (by comparing the current device status 
  26. against the device-dispatcher maintained status).
  27.  
  28. A GS/OS driver may have an interrupt handler present to handle interrupts 
  29. generated by its device on insertion or ejection (if the hardware is capable 
  30. of generating such interrupts).  Such an interrupt handler will probably want 
  31. to call SET_DISKSW when an insertion or ejection is detected to make the rest 
  32. of the operating system aware of it.  However, SET_DISKSW obtains the device's 
  33. status based on the deviceNum and callNum on the GS/OS direct page.
  34.  
  35. Any driver or interrupt handler calling SET_DISKSW must first save the values 
  36. for deviceNum and callNum on the GS/OS direct page, replacing callNum with the 
  37. number of a driver call that accesses media (Apple suggests Driver_Read, 
  38. $0002) and replacing deviceNum with the number of the device for which 
  39. SET_DISKSW is being called.  The caller must restore the original values after 
  40. SET_DISKSW returns.
  41.  
  42. Although SET_DISKSW saves and restores the GS/OS direct page, the caller must 
  43. know where the GS/OS direct page is located so it can place the proper 
  44. parameters there.  The value used for the GS/OS direct page should be the 
  45. value of the D register when the driver receives its Driver_StartUp call.  The 
  46. GS/OS direct page is now guaranteed to remain constant between Driver_StartUp 
  47. and Driver_ShutDown calls.
  48.  
  49.  
  50. Further Reference
  51. _____________________________________________________________________________
  52.     o    GS/OS Reference, Volume 2